#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：pythonProject2 
@File    ：pro7.py
@Author  ：beibei
@Date    ：2023/12/14 7:17 PM 
'''


def repeat(n):
    def decorator(func):
        def wrapper(*args, **kwargs):
            for _ in range(n):
                result = func(*args, **kwargs)
            return result

        return wrapper

    return decorator


@repeat(n=3)
def print_message():
    print("Hello, china")


# 测试装饰器
print_message()
